// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*! 
 * @file SensorCombined.h
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool gen.
 */

#ifndef _SensorCombined_H_
#define _SensorCombined_H_

// TODO Poner en el contexto.

#include <stdint.h>
#include <array>
#include <string>
#include <vector>

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif
#else
#define eProsima_user_DllExport
#endif

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(SensorCombined_SOURCE)
#define SensorCombined_DllAPI __declspec( dllexport )
#else
#define SensorCombined_DllAPI __declspec( dllimport )
#endif // SensorCombined_SOURCE
#else
#define SensorCombined_DllAPI
#endif
#else
#define SensorCombined_DllAPI
#endif // _WIN32

namespace eprosima
{
    namespace fastcdr
    {
        class Cdr;
    }
}

/*!
 * @brief This class represents the structure SensorCombined defined by the user in the IDL file.
 * @ingroup SENSORCOMBINED
 */
class SensorCombined
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport SensorCombined();
    
    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~SensorCombined();
    
    /*!
     * @brief Copy constructor.
     * @param x Reference to the object SensorCombined that will be copied.
     */
    eProsima_user_DllExport SensorCombined(const SensorCombined &x);
    
    /*!
     * @brief Move constructor.
     * @param x Reference to the object SensorCombined that will be copied.
     */
    eProsima_user_DllExport SensorCombined(SensorCombined &&x);
    
    /*!
     * @brief Copy assignment.
     * @param x Reference to the object SensorCombined that will be copied.
     */
    eProsima_user_DllExport SensorCombined& operator=(const SensorCombined &x);
    
    /*!
     * @brief Move assignment.
     * @param x Reference to the object SensorCombined that will be copied.
     */
    eProsima_user_DllExport SensorCombined& operator=(SensorCombined &&x);
    
    /*!
     * @brief This function sets a value in member timestamp
     * @param _timestamp New value for member timestamp
     */
    inline eProsima_user_DllExport void timestamp(uint64_t _timestamp)
    {
        m_timestamp = _timestamp;
    }

    /*!
     * @brief This function returns the value of member timestamp
     * @return Value of member timestamp
     */
    inline eProsima_user_DllExport uint64_t timestamp() const
    {
        return m_timestamp;
    }

    /*!
     * @brief This function returns a reference to member timestamp
     * @return Reference to member timestamp
     */
    inline eProsima_user_DllExport uint64_t& timestamp()
    {
        return m_timestamp;
    }
    /*!
     * @brief This function copies the value in member gyro_rad
     * @param _gyro_rad New value to be copied in member gyro_rad
     */
    inline eProsima_user_DllExport void gyro_rad(const std::array<float, 3> &_gyro_rad)
    {
        m_gyro_rad = _gyro_rad;
    }

    /*!
     * @brief This function moves the value in member gyro_rad
     * @param _gyro_rad New value to be moved in member gyro_rad
     */
    inline eProsima_user_DllExport void gyro_rad(std::array<float, 3> &&_gyro_rad)
    {
        m_gyro_rad = std::move(_gyro_rad);
    }

    /*!
     * @brief This function returns a constant reference to member gyro_rad
     * @return Constant reference to member gyro_rad
     */
    inline eProsima_user_DllExport const std::array<float, 3>& gyro_rad() const
    {
        return m_gyro_rad;
    }

    /*!
     * @brief This function returns a reference to member gyro_rad
     * @return Reference to member gyro_rad
     */
    inline eProsima_user_DllExport std::array<float, 3>& gyro_rad()
    {
        return m_gyro_rad;
    }
    /*!
     * @brief This function sets a value in member gyro_integral_dt
     * @param _gyro_integral_dt New value for member gyro_integral_dt
     */
    inline eProsima_user_DllExport void gyro_integral_dt(float _gyro_integral_dt)
    {
        m_gyro_integral_dt = _gyro_integral_dt;
    }

    /*!
     * @brief This function returns the value of member gyro_integral_dt
     * @return Value of member gyro_integral_dt
     */
    inline eProsima_user_DllExport float gyro_integral_dt() const
    {
        return m_gyro_integral_dt;
    }

    /*!
     * @brief This function returns a reference to member gyro_integral_dt
     * @return Reference to member gyro_integral_dt
     */
    inline eProsima_user_DllExport float& gyro_integral_dt()
    {
        return m_gyro_integral_dt;
    }
    /*!
     * @brief This function sets a value in member accelerometer_timestamp_relative
     * @param _accelerometer_timestamp_relative New value for member accelerometer_timestamp_relative
     */
    inline eProsima_user_DllExport void accelerometer_timestamp_relative(int32_t _accelerometer_timestamp_relative)
    {
        m_accelerometer_timestamp_relative = _accelerometer_timestamp_relative;
    }

    /*!
     * @brief This function returns the value of member accelerometer_timestamp_relative
     * @return Value of member accelerometer_timestamp_relative
     */
    inline eProsima_user_DllExport int32_t accelerometer_timestamp_relative() const
    {
        return m_accelerometer_timestamp_relative;
    }

    /*!
     * @brief This function returns a reference to member accelerometer_timestamp_relative
     * @return Reference to member accelerometer_timestamp_relative
     */
    inline eProsima_user_DllExport int32_t& accelerometer_timestamp_relative()
    {
        return m_accelerometer_timestamp_relative;
    }
    /*!
     * @brief This function copies the value in member accelerometer_m_s2
     * @param _accelerometer_m_s2 New value to be copied in member accelerometer_m_s2
     */
    inline eProsima_user_DllExport void accelerometer_m_s2(const std::array<float, 3> &_accelerometer_m_s2)
    {
        m_accelerometer_m_s2 = _accelerometer_m_s2;
    }

    /*!
     * @brief This function moves the value in member accelerometer_m_s2
     * @param _accelerometer_m_s2 New value to be moved in member accelerometer_m_s2
     */
    inline eProsima_user_DllExport void accelerometer_m_s2(std::array<float, 3> &&_accelerometer_m_s2)
    {
        m_accelerometer_m_s2 = std::move(_accelerometer_m_s2);
    }

    /*!
     * @brief This function returns a constant reference to member accelerometer_m_s2
     * @return Constant reference to member accelerometer_m_s2
     */
    inline eProsima_user_DllExport const std::array<float, 3>& accelerometer_m_s2() const
    {
        return m_accelerometer_m_s2;
    }

    /*!
     * @brief This function returns a reference to member accelerometer_m_s2
     * @return Reference to member accelerometer_m_s2
     */
    inline eProsima_user_DllExport std::array<float, 3>& accelerometer_m_s2()
    {
        return m_accelerometer_m_s2;
    }
    /*!
     * @brief This function sets a value in member accelerometer_integral_dt
     * @param _accelerometer_integral_dt New value for member accelerometer_integral_dt
     */
    inline eProsima_user_DllExport void accelerometer_integral_dt(float _accelerometer_integral_dt)
    {
        m_accelerometer_integral_dt = _accelerometer_integral_dt;
    }

    /*!
     * @brief This function returns the value of member accelerometer_integral_dt
     * @return Value of member accelerometer_integral_dt
     */
    inline eProsima_user_DllExport float accelerometer_integral_dt() const
    {
        return m_accelerometer_integral_dt;
    }

    /*!
     * @brief This function returns a reference to member accelerometer_integral_dt
     * @return Reference to member accelerometer_integral_dt
     */
    inline eProsima_user_DllExport float& accelerometer_integral_dt()
    {
        return m_accelerometer_integral_dt;
    }
    /*!
     * @brief This function sets a value in member magnetometer_timestamp_relative
     * @param _magnetometer_timestamp_relative New value for member magnetometer_timestamp_relative
     */
    inline eProsima_user_DllExport void magnetometer_timestamp_relative(int32_t _magnetometer_timestamp_relative)
    {
        m_magnetometer_timestamp_relative = _magnetometer_timestamp_relative;
    }

    /*!
     * @brief This function returns the value of member magnetometer_timestamp_relative
     * @return Value of member magnetometer_timestamp_relative
     */
    inline eProsima_user_DllExport int32_t magnetometer_timestamp_relative() const
    {
        return m_magnetometer_timestamp_relative;
    }

    /*!
     * @brief This function returns a reference to member magnetometer_timestamp_relative
     * @return Reference to member magnetometer_timestamp_relative
     */
    inline eProsima_user_DllExport int32_t& magnetometer_timestamp_relative()
    {
        return m_magnetometer_timestamp_relative;
    }
    /*!
     * @brief This function copies the value in member magnetometer_ga
     * @param _magnetometer_ga New value to be copied in member magnetometer_ga
     */
    inline eProsima_user_DllExport void magnetometer_ga(const std::array<float, 3> &_magnetometer_ga)
    {
        m_magnetometer_ga = _magnetometer_ga;
    }

    /*!
     * @brief This function moves the value in member magnetometer_ga
     * @param _magnetometer_ga New value to be moved in member magnetometer_ga
     */
    inline eProsima_user_DllExport void magnetometer_ga(std::array<float, 3> &&_magnetometer_ga)
    {
        m_magnetometer_ga = std::move(_magnetometer_ga);
    }

    /*!
     * @brief This function returns a constant reference to member magnetometer_ga
     * @return Constant reference to member magnetometer_ga
     */
    inline eProsima_user_DllExport const std::array<float, 3>& magnetometer_ga() const
    {
        return m_magnetometer_ga;
    }

    /*!
     * @brief This function returns a reference to member magnetometer_ga
     * @return Reference to member magnetometer_ga
     */
    inline eProsima_user_DllExport std::array<float, 3>& magnetometer_ga()
    {
        return m_magnetometer_ga;
    }
    /*!
     * @brief This function sets a value in member baro_timestamp_relative
     * @param _baro_timestamp_relative New value for member baro_timestamp_relative
     */
    inline eProsima_user_DllExport void baro_timestamp_relative(int32_t _baro_timestamp_relative)
    {
        m_baro_timestamp_relative = _baro_timestamp_relative;
    }

    /*!
     * @brief This function returns the value of member baro_timestamp_relative
     * @return Value of member baro_timestamp_relative
     */
    inline eProsima_user_DllExport int32_t baro_timestamp_relative() const
    {
        return m_baro_timestamp_relative;
    }

    /*!
     * @brief This function returns a reference to member baro_timestamp_relative
     * @return Reference to member baro_timestamp_relative
     */
    inline eProsima_user_DllExport int32_t& baro_timestamp_relative()
    {
        return m_baro_timestamp_relative;
    }
    /*!
     * @brief This function sets a value in member baro_alt_meter
     * @param _baro_alt_meter New value for member baro_alt_meter
     */
    inline eProsima_user_DllExport void baro_alt_meter(float _baro_alt_meter)
    {
        m_baro_alt_meter = _baro_alt_meter;
    }

    /*!
     * @brief This function returns the value of member baro_alt_meter
     * @return Value of member baro_alt_meter
     */
    inline eProsima_user_DllExport float baro_alt_meter() const
    {
        return m_baro_alt_meter;
    }

    /*!
     * @brief This function returns a reference to member baro_alt_meter
     * @return Reference to member baro_alt_meter
     */
    inline eProsima_user_DllExport float& baro_alt_meter()
    {
        return m_baro_alt_meter;
    }
    /*!
     * @brief This function sets a value in member baro_temp_celcius
     * @param _baro_temp_celcius New value for member baro_temp_celcius
     */
    inline eProsima_user_DllExport void baro_temp_celcius(float _baro_temp_celcius)
    {
        m_baro_temp_celcius = _baro_temp_celcius;
    }

    /*!
     * @brief This function returns the value of member baro_temp_celcius
     * @return Value of member baro_temp_celcius
     */
    inline eProsima_user_DllExport float baro_temp_celcius() const
    {
        return m_baro_temp_celcius;
    }

    /*!
     * @brief This function returns a reference to member baro_temp_celcius
     * @return Reference to member baro_temp_celcius
     */
    inline eProsima_user_DllExport float& baro_temp_celcius()
    {
        return m_baro_temp_celcius;
    }
    
    /*!
     * @brief This function returns the maximum serialized size of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getMaxCdrSerializedSize(size_t current_alignment = 0);

    /*!
     * @brief This function returns the serialized size of a data depending on the buffer alignment.
     * @param data Data which is calculated its serialized size.
     * @param current_alignment Buffer alignment.
     * @return Serialized size.
     */
    eProsima_user_DllExport static size_t getCdrSerializedSize(const SensorCombined& data, size_t current_alignment = 0);


    /*!
     * @brief This function serializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const;

    /*!
     * @brief This function deserializes an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr);



    /*!
     * @brief This function returns the maximum serialized size of the Key of an object
     * depending on the buffer alignment.
     * @param current_alignment Buffer alignment.
     * @return Maximum serialized size.
     */
    eProsima_user_DllExport static size_t getKeyMaxCdrSerializedSize(size_t current_alignment = 0);

    /*!
     * @brief This function tells you if the Key has been defined for this type
     */
    eProsima_user_DllExport static bool isKeyDefined();

    /*!
     * @brief This function serializes the key members of an object using CDR serialization.
     * @param cdr CDR serialization object.
     */
    eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const;
    
private:
    uint64_t m_timestamp;
    std::array<float, 3> m_gyro_rad;
    float m_gyro_integral_dt;
    int32_t m_accelerometer_timestamp_relative;
    std::array<float, 3> m_accelerometer_m_s2;
    float m_accelerometer_integral_dt;
    int32_t m_magnetometer_timestamp_relative;
    std::array<float, 3> m_magnetometer_ga;
    int32_t m_baro_timestamp_relative;
    float m_baro_alt_meter;
    float m_baro_temp_celcius;
};

#endif // _SensorCombined_H_